package ch03_程序流程控制;

import java.util.Scanner;

public class Ch3_13 {
	public static void main(String[] args) {
		Scanner s=new Scanner(System.in);
		int n;
		System.out.println("请输入整数：");
		n=s.nextInt();
		System.out.print(n+"=");
		for(int i=2;n>1;) {
			if(n%i==0) {
				int j=2;
				for(;j<i;j++) {
					if(i%j==0) {
						break;
					}
				}
				if(j==i) {
					n=n/i;
					System.out.print(i+"*");
					
				}
			}
			else {
				i++;
			}
		}
		System.out.print("\b ");
	}
}
